package zihua.lee.sdk.types.utils;

import java.util.Random;

/**
 * \* User: 木辛桦
 * \* gitee:https://gitee.com/lzfa7
 * \* Date: 2024/9/13
 * \* Time: 17:45
 * \* Description:
 * \
 */
public class RandomStringUtils {
    public static String generateRandomString(int length){
        String characters = "ABCDEFGHIJKLMNOPQRSTUVWSYZabcdefghijklmnopqrstuvwsyz1234567890";
        Random random = new Random();
        StringBuilder sb = new StringBuilder(length);
        for(int i =0;i<length;i++){
            sb.append(characters.charAt(random.nextInt(characters.length())));
        }
        return sb.toString();
    }
}